<tagLib name="html" />
<include file="../Public/header" />

<div id="main" class="main" >
    <div class="content">
        <div class="title">{$tagName} [ <A HREF="__URL__">返回列表</A> ]</div>
        <present name="list">
            <FORM METHOD=POST id="form1" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)" >
                <TABLE cellpadding=3 cellspacing=3>
                    <volist name="list" id="vo">
                        <TR>
                            <TD class="tRight tTop" >{$vo.title}：</TD>
                            <TD class="tLeft" ><switch name="vo.type" >
                        <case value="0"><input TYPE="text" class="bLeft large" NAME="{$vo.name}" value="{$vo.value}" ></case>
                        <case value="1"><input TYPE="text" class="medium " check="Number" warning="{$vo.title}必须是数字" NAME="{$vo.name}" value="{$vo.value}"></case>
                        <case value="2">
                            <SELECT NAME="{$vo.name}">
                                <option value="">选择</option>
                                <?php if (!empty($vo['extra'])) { $option	=	explode(',',$vo['extra']);?>
                                <option <?php if ($vo['value']=='0'){ ?>selected<?php };?> value="0"> {$option[0]} </option>
                                <option <?php if ($vo['value']=='1'){ ?>selected<?php };?> value="1"> {$option[1]} </option>
                                <?php }; ?>
                            </SELECT>
                        </case>
                        <case value="3"><TEXTAREA style="overflow:auto" class="large " NAME="{$vo.name}" ROWS="5" COLS="35">{$vo.value}</TEXTAREA></case>
                        <case value="4">
                            <SELECT NAME="{$vo.name}" class="medium">
                                <?php if (!empty($vo['extra'])) { $option	=	explode(',',$vo['extra']);?>
                                <volist name="option" id="extra">
                                    <php>$array	=	explode(':',$extra);$value	=	$array[0];$show	=	isset($array[1])?$array[1]:$array[0];</php>
                                    <option <?php if ($vo['value']==$value){ ?>selected<?php };?> value="{$value}"> {$show} </option>
                                </volist>
                                <?php }; ?>
                            </SELECT>
                        </case>
                        </switch></TD>
                        <TD >{$vo.remark}</TD>
                        </TR>
                    </volist>
                    <TR>
                        <TD ></TD>
                        <TD class="center">
                            <input TYPE="hidden" name="ajax" value="1">
                            <div class="impBtn fLeft"><input TYPE="button" value="保存" onclick="sendForm('form1','__URL__/saveConfig/','tips')" class="save imgButton"></div>
                            <div class="impBtn fLeft hMargin"><input TYPE="reset" class="reset imgButton" value="清空" ></div>
                        </TD>
                        <TD ></TD>
                    </TR>
                </TABLE>
            </FORM>
            <else/>
            <div style="padding:5px;text-align:center;border:1px solid gray;color:red;font-weight:bold;background:#FFFFCC;margin:12px 25%">提示：该配置分组下面还没有配置参数！</div>
        </present>
    </div>
</div>
